<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<button onclick="m1()">按钮1</button>
<button onclick="m2()">按钮2</button>
<button onclick="m3()">按钮3</button>
<script type="text/javascript">
    function m1() {
        alert('提示按钮')
    }

    function m2() {
        var b = confirm('确认吗');
        console.log(b)
    }

    function m3() {
        var s = prompt('请输入您的年龄');
        console.log(s)
    }
</script>
</body>
</html>